package com.qfjy.homework.yangwannian;

/**
 * @Author: yangwannian
 * @Date: 2022/6/29 - 17:41
 * @Description: com.qfjy.homework.yangwannian
 * @version: 1.0
 */
public class RedShapeDecorator extends ShapeDecorator {

    public RedShapeDecorator(Shape decoratedShape) {
        super(decoratedShape);
    }

    @Override
    public void draw() {
        decoratedShape.draw();
        setRedBorder(decoratedShape);
    }

    /**
     * 扩展功能 添加红色边框
     * @param decoratedShape
     */
    private void setRedBorder(Shape decoratedShape){
        System.out.println("Border Color: Red");
    }
}
